package com.woniuxy.yoga.course.client;

import com.woniuxy.yoga.commons.core.model.Result;
import com.woniuxy.yoga.course.client.dto.business.BusinessStoreDTO;
import com.woniuxy.yoga.course.client.dto.business.StoreClassroomByIdDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 商家的服务访问类
 */
@FeignClient(name = "business-service",path = "/business")
public interface BusinessClient {

    /**
     * 通过门店ID查询门店信息
     * @param storeId
     * @return
     */
    @GetMapping("/businessStore/selByStoreId/{storeId}")
    public Result<BusinessStoreDTO> selByBusinessStoreId(@PathVariable("storeId") Integer storeId);

    /**
     * 根据教室id查询教室信息
     * @param storeClassroomId
     * @return
     * @throws Exception
     */
    @GetMapping("/storeClassroom/selNormalById/{storeClassroomId}")
    public Result<StoreClassroomByIdDTO> selNormalByStoreClassroomId(@PathVariable("storeClassroomId") Integer storeClassroomId);
}
